<?php

namespace app\home\controller;

use core\Db;

class Index
{
    public function index()
    {
        echo 'Current location: start_php_framework\application\home\controller\Index\index';
    }

    public function index2()
    {
        echo 'Current location: start_php_framework\application\home\controller\Index\index2';
    }

    private function index3()
    {
        echo 'Current location: start_php_framework\application\home\controller\Index\index3';
    }

    public function useDb() 
    {
        $dbConnect = Db::getInstance();

        $res = $dbConnect
            ->table('z_test')
            ->field(['id', 'test_int'])
            ->where('id > 0')
            ->order(['id ASC'])
            ->findAll();
        echo '<pre>';
        var_dump($res);
    }

}